#include <iostream>
#include <vector>
#include <math.h>
#include "resample.h"

using namespace std;

int main ()
{
  int kUpfactor = 3, kDownfactor = 8;
  int N = 41;
  vector<double> input(N), output;

  for (int i = 0; i < N; i++) {
      input[i] = sin(0.1 * M_PI * i) + 0.5 * sin(0.5 * M_PI * i);
  }

  resample<double>(kUpfactor, kDownfactor, input, output);

  for (int i = 0, n = output.size(); i < n; i++)
      cout << output[i] << endl;


  return 0;
}
